// 创建一个react-native页面，用react-native-video加载rtsp流，实现实时监控

import React from 'react';
import { View, Text, StyleSheet } from 'react-native';
import { VLCPlayer, VlCPlayerView } from 'react-native-vlc-media-player';


const VideoScreen = () => {
  return (
    <View style={styles.container}>
      <VLCPlayer
        style={[styles.backgroundVideo]}
        videoAspectRatio="16:9"
        // source={{ uri: 'rtsp://admin:Ccenrun2014!@192.168.31.64:554/h264/1/main/av_stream' }}
        source={{ uri: 'rtsp://admin:Ccenrun2014!@33880947qlww.vicp.fun:49250/h264/1/main/av_stream' }}
      />
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1, width: '100%', height: '100%',
    backgroundColor: 'red',
  },
  backgroundVideo: {
    flex: 1, width: '100%',
  },
});


export default VideoScreen;
